package com.zynn.service.module.canal.listener;

import com.alibaba.otter.canal.protocol.CanalEntry;
import com.zynn.service.module.canal.bo.EntryWithRowChange;
import com.zynn.service.module.canal.event.DeleteCanalEvent;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.Map;


/**
 *
 * @author jerry-liqi
 *
 * 监听删除
 *
 * @TODO
 */
@Component
@Slf4j
public class DeleteCanalListener extends AbstractCanalListener<DeleteCanalEvent> {
    private static final Logger logger = LoggerFactory.getLogger(DeleteCanalListener.class);



    @Override
    protected void doSync(String database, String table, CanalEntry.RowData rowData) {
        log.info("DeleteCanalListener："+ database + table);
        Map<String, Object> columnsMap = super.parseColumnsToMap(rowData.getBeforeColumnsList());
    }
}
